package com.simulador.mainframe;

public class SimulatorEvent implements Comparable<SimulatorEvent> {
	public enum EventType { Arrivals, ProcessorOutput }
	
	public EventType type;
	public float time;
	public float remainingTime;

	public SimulatorEvent(EventType type, float time) {
		this.type = type;
		this.time = time;
	}	
	
	public SimulatorEvent(EventType type, float time, float remainingTime) {
		this.type = type;
		this.time = time;
		this.remainingTime = remainingTime;
	}

	@Override
	public int compareTo(SimulatorEvent otherEvent) {
		if (time < otherEvent.time) {
			return -1;
			
		} else if (time > otherEvent.time) {				
			return 1;
			
		}
		
		return 0;
	}
	
	
}
